Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify namespace filter logic for backup with label selector #7697

Merged

Conversation

blackpiglet
Copy link
Contributor

@blackpiglet blackpiglet commented Apr 17, 2024

Thank you for contributing to Velero!

Please add a summary of your change

  • Add namespace tracker for backup item collector;
  • Namespace tracker checks whether a namespace should be backed up according to the backup's namespace filter, backup label selector, and the backup or label selector;
  • Namespace tracker will delete the namespaces not tracked from the backup;
  • Add the size for the backup description output of the data-moved volumes.

Does your change fix a particular issue?

Fixes #7105

Please indicate you've done the following:

  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Created a changelog file or added /kind changelog-not-required as a comment on this pull request.
  • Updated the corresponding documentation in site/content/docs/main.

@blackpiglet blackpiglet force-pushed the backup_volumeinfo_cli_update branch from 2d66cdf to cbec32e Compare April 17, 2024 10:55
@blackpiglet blackpiglet force-pushed the backup_volumeinfo_cli_update branch from cbec32e to 976778a Compare April 17, 2024 15:06
Copy link

codecov bot commented Apr 17, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 44 lines in your changes are missing coverage. Please review.

Project coverage is 58.58%. Comparing base (f04fbbc) to head (884bcbe).
Report is 6 commits behind head on main.

Files Patch % Lines
pkg/backup/item_collector.go 74.85% 36 Missing and 8 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7697      +/-   ##
==========================================
+ Coverage   58.49%   58.58%   +0.08%     
==========================================
  Files         343      343              
  Lines       28486    28592     +106     
==========================================
+ Hits        16664    16751      +87     
- Misses      10406    10422      +16     
- Partials     1416     1419       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@blackpiglet blackpiglet marked this pull request as ready for review April 17, 2024 15:16
@blackpiglet blackpiglet changed the title Backup volumeinfo cli update Modify namespace filter logic for backup with label selector. Apr 17, 2024
@blackpiglet blackpiglet changed the title Modify namespace filter logic for backup with label selector. Modify namespace filter logic for backup with label selector Apr 17, 2024
pkg/cmd/util/output/backup_describer.go Show resolved Hide resolved
changelogs/unreleased/7697-blackpiglet Outdated Show resolved Hide resolved
@blackpiglet blackpiglet force-pushed the backup_volumeinfo_cli_update branch 2 times, most recently from bbac4fa to 80271e7 Compare April 18, 2024 02:27
@blackpiglet blackpiglet force-pushed the backup_volumeinfo_cli_update branch 2 times, most recently from cd8af97 to 3508d24 Compare April 18, 2024 02:39
@blackpiglet blackpiglet force-pushed the backup_volumeinfo_cli_update branch 10 times, most recently from b9d9272 to abb1140 Compare April 18, 2024 06:05
reasonerjt

This comment was marked as outdated.

@blackpiglet blackpiglet force-pushed the backup_volumeinfo_cli_update branch 8 times, most recently from 3d9d7ab to 6c2823f Compare April 19, 2024 06:05
@blackpiglet blackpiglet force-pushed the backup_volumeinfo_cli_update branch from 6c2823f to cb3aae3 Compare April 19, 2024 09:21
@blackpiglet blackpiglet force-pushed the backup_volumeinfo_cli_update branch from cb3aae3 to 884bcbe Compare April 19, 2024 10:41
pkg/util/collections/includes_excludes.go Outdated Show resolved Hide resolved
pkg/backup/item_collector.go Outdated Show resolved Hide resolved
pkg/backup/item_collector.go Outdated Show resolved Hide resolved
@blackpiglet blackpiglet merged commit 5f9c53a into vmware-tanzu:main Apr 22, 2024
67 checks passed
@blackpiglet blackpiglet mentioned this pull request Apr 23, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Backup is backing up all namespaces when includedNamespaces are omitted and using only labelSelector
4 participants